package org.ccu.eshop.service.impl;

import org.ccu.eshop.dao.OrdersDao;
import org.ccu.eshop.domain.dto.OrdersVo;
import org.ccu.eshop.service.OrderServiceltface;

import javax.security.auth.login.CredentialException;
import java.util.List;

public class OrderServiceimpl implements OrderServiceltface {

    OrdersDao ordersDao=new OrdersDao();
        @Override
    public OrdersVo getOrdersByOrderNo(String orderNo) {
        return ordersDao.selectOrdersByOrderNo(orderNo);
    }

    @Override
    public List<OrdersVo> getOrdersListByMid(Integer member) {
            return ordersDao.selectOrdersListByMid(member);
    }

    @Override
    public boolean deleteOrderById(String id) {
            int int_id=Integer.parseInt(id);
        return ordersDao.deleteOrderById(int_id);
    }

    @Override
    public OrdersVo getOrderById(String id) {
            int int_id=Integer.parseInt(id);
        return ordersDao.selectOrdersById(int_id);
    }
}
